package LRUCache;

import java.util.ArrayList;
import java.util.List;

/**
 * @author wtcode
 * @Description
 * @date 2025/3/21 - 14:51
 */
public class RepeatNum {

    public static void main(String[] args) {



    }

    public static int jump(int[] nums) {
        int end = 0;
        int maxPosition = 0;
        int step = 0;
        for(int i = 0 ; i < nums.length - 1; i++){
            maxPosition = Math.max(maxPosition,i + nums[i]);
            if(i == end){
                end = maxPosition;
                step++;
            }
        }
        return step;
    }




}
